package com.detect.core;

import java.io.File;

public interface HashCode {
    /*
     * public static final int DEFAULT_LEVEL = HashCode.LEVEL_LOW; public static
     * final int LEVEL_LOW = 512;// calculate 512 * 1024b = 512kB public static
     * final int LEVEL_MIDDLE = 2048;// calculate 2048 * 1024b = 2MB public
     * static final int LEVEL_HIGH = 10240;// calculate 10240 * 1024b = 10MB
     * public static final int LEVEL_FULL = 0;// full file calculate
     */
    /**
     * 计算文件的MD5值
     * 
     * @param file
     * @return
     */
    String getFileMD5(File file);

    /**
     * 计算url的MD5值
     * 
     * @param URLName
     * @return
     */
    String getUrlMD5(String URLName);

    /**
     * 计算字符串的MD5值
     * 
     * @param str
     * @return
     */
    String getStringMD5(String str);
}
